﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<iss.sg4210.se18.team6s.jass.DAL.Advertisement>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Index</h2>
    <table>
        <tr>
            <th>
            </th>
            <th>
                Title
            </th>
            <th>
                Description
            </th>
            <th>
                Experience<br />
                (yrs)
            </th>
            <th>
                Salary From
            </th>
            <th>
                Salary To
            </th>
            <th>
                Start Date
            </th>
            <th>
                Location
            </th>
            <th>
                Company
            </th>
            <th>
                Deleted
            </th>
            <th>
                WithDrawn
            </th>
            <th>
                FulFilled
            </th>
            <th>
                Advertisement Type
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.Id }) %>
                |
                <%: Html.ActionLink("Details", "Details", new { id=item.Id })%>
                |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.Id })%>
            </td>
            <td>
                <%: item.Title %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <%: item.ExperienceInYears %>
            </td>
            <td>
                <%: item.SalaryFrom %>
            </td>
            <td>
                <%: item.SalaryTo %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.StartDate) %>
            </td>
            <td>
                <%: item.GeoArea.Name %>
            </td>
            <td>
                <%: item.Company.Name%>
            </td>
            <td>
                <%: Html.DisplayFor(item1=>item.IsDeleted, "Boolean") %>
            </td>
            <td>
                <%: Html.DisplayFor(item1 => item.IsWithDrawn, "Boolean")%>
            </td>
            <td>
                <%: Html.DisplayFor(item1 => item.IsFulFilled, "Boolean")%>
            </td>
            <td>
                <%: item.AdvertisementType.Type %>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>
</asp:Content>
